package com.hjd.shop.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.hjd.shop.api.service.SOrderPayService;
import com.hjd.shop.base.Response;
import com.hjd.shop.entity.SOrderPay;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: hjd
 * @Date: 2020/11/1 0001 20:08
 */
@RestController
@RequestMapping("/pay")
public class PayController {
    @Reference
    private SOrderPayService orderPayService;

    @PostMapping("/createOrderPay")
    public Response createOrderPay(@RequestBody SOrderPay orderPay){
       return orderPayService.createOrderPay(orderPay);
    }
    @PostMapping("/callBackPay")
    public Response callBackPay(@RequestBody SOrderPay orderPay){
        return orderPayService.payedCallBack(orderPay);
    }

}
